import { request } from "@/utils/request";

// 分类相关API
export default {
	list(data) {
		return request({
			url: '/mall/cart/listGroupByShop',
			method: 'GET',
			data
		})
	},

	submit(data) {
		return request({
			url: `/mall/cart/${data.id ? 'edit' : 'add'}`,
			method: 'POST',
			data
		})
	},

	del(data) {
		return request({
			url: '/mall/cart/delete',
			method: 'POST',
			data
		})
	},

	check(data) {
		return request({
			url: '/mall/cart/check',
			method: 'POST',
			data: {
				ids: data.ids,
				checked: data.checked
			}
		})
	},
}